<h1>DefineButton</h1>

<p>DefineButton defines the appearance of a button and the actions performed 
when the button is clicked.</p>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">type</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">10</td>
<td>Identifies the DefineButton instruction when it is encoded. It is encoded 
with the length field as a 16-bit integer (Little-endian byte order).</td>
</tr>

<tr>
<td nowrap valign="top">length</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">6</td>
<td>The length in bytes of the body of the instruction when it is encoded. If the length is greater 
than 62 then this field is set to 0x3F and the length is encoded using the 
extendedLength field. Encoded with the type field as a 16-bit integer.</td>
</tr>

<tr>
<td nowrap valign="top">extendedLength</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">32</td>
<td>Optional. Contains the length in bytes of the encoded instruction if it is
greater than 62 bytes. If the length is 62 bytes or less then this field is 
omitted.</td>
</tr>

<tr>
<td nowrap valign="top">identifier</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>The unique identifier for this button definition. This is used when adding or removing 
the shape from the display list or when the shape is used as part of another 
object such as a button.</td>
</tr>

<tr>
<td nowrap valign="top">buttons</td>
<td nowrap valign="top">Button[n]</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>An array of Buttons that define the appearance of the button in each of its 
states. The array must contain at least one Button.</td>
</td>
</tr>

<tr>
<td nowrap valign="top">actions</td>
<td nowrap valign="top">Actions[n]</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>An array of actions that are executed when the button is clicked.</td>
</td>
</tr>

</table>

<p>A DefineButton instruction must contain at least one Button. If more than one 
Button is defined for a given button state then each shape will be displayed by 
the button. The order in which the shapes are displayed is determined by the 
layer assigned to each Button.</P>

<h2>History</h2>

<p>The DefineButton instruction represents the DefineButton structure from 
the Macromedia Flash (SWF) File Format Specification. It was introduced in Flash 1.</p>
